package com.yunzhong.appointment.listAnnouncement.service.impl;

import com.yunzhong.appointment.entity.Noticeboard;
import com.yunzhong.appointment.listAnnouncement.service.IListAnnouncementService;
import com.yunzhong.appointment.mapper.NoticeboardMapper;
import com.yunzhong.appointment.util.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListAnnouncementServiceImpl implements IListAnnouncementService {
    @Autowired
    private NoticeboardMapper noticeboardMapper;
    @Override
    public List<Noticeboard> queryAll(PageData pd) {
        System.out.println("pd-----------"+pd);
        pd.setPageData(pd);

        return noticeboardMapper.queryAll(pd);
    }

    @Override
    public Noticeboard queryById(String id) {
        return noticeboardMapper.selectByPrimaryKey(id);
    }
}
